package com.kk.Mapper;

import com.kk.Entry.Employee;
import com.kk.dto.EmpDto;
import org.apache.ibatis.annotations.*;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface EmpMapper {


    List<Employee> findPageEmp(EmpDto dto);

    int deleteEmps(@Param("ids") ArrayList<Integer> ids);

    @Insert("insert into emp values(null ,  #{username} , '123456' , #{name},#{gender},#{image},#{job},#{entryDate},#{deptId},#{createTime},#{updateTime})")
    int addEmp(Employee employee);

    @Select("select * from emp where id = #{id}")
    Employee findById(Integer id);

    int updateEmp(Employee employee);

    @Select("select * from emp where username = #{username} and password = #{password}")
    Employee loginEmp(Employee employee);
}
